<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>相对定位</title>
    <style>
        div{
            width: 200px;
            height: 200px;
        }
        #box1{
            background: red;
        }
        #box2{
            background: #35ac5d;
            /*相对定位
            1、以当前为参照物移动*/
            position: relative;
            top:200px;
            left:200px;
        }
        #box3{
            background: #3344b3;
        }

    </style>
</head>
<body>
<div id="box1"></div>
<div id="box2"></div>
<div id="box3"></div>
</body>
</html>